﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AlbumList.ascx.cs" Inherits="FrontEnd_Blocks_AlbumList" %>

<!--
  -- ALBUMLIST
  -- This module list all albums created by user.
  -->
  
<div class="module" id="album-list">
    <div class="edit-toolbar">
        <div class="edit-button"></div>
        <div class="delete-button"></div>
    </div>
    <div class="title">ALBUM ẢNH</div>
    <%
        BLO.User user=new BLO.User(Session["LoginUser"].ToString());
        if (BLO.Album.GetAlbumWithUserId(user.Info.ID).Count == 0)
                  {
                      Response.Write("<div>Chưa có album nào</div>");
                  }
                  else
                  {
                      int l = BLO.Album.GetAlbumWithUserId(user.Info.ID).Count;
                      for (int i = 0; i < l; i++)
                      {
                          DTO.Album item = (DTO.Album)BLO.Album.GetAlbumWithUserId(user.Info.ID)[i];
                          Response.Write("<div class='info'>" + "<a href='" + ResolveUrl( Util.ServerPath.FrontEnd +"ShowPhoto.aspx?albumID="+item.ID) + "'>" + item.Name + "</a></div>");
                      }
                  }            
                %>
    
</div>